import request from '@/utils/request'

//推广管理-专题管理列表查询
export function listSubject(query){
    return request({
        url: '/topic/list',
        method: 'get',
        params: query
    })
}

//推广管理-新增专题
export function addSubject(data){
    return request({
        url: '/topic/create',
        method: 'post',
        data
    })
}

//推广管理-新增专题
export function updateSubject(data){
    return request({
        url: '/topic/update',
        method: 'post',
        data
    })
}

//推广管理-获取专题详情
export function readSubject(query){
    return request({
        url: '/topic/read',
        method: 'get',
        params: query
    })
}


//推广管理-删除专题
export function deleteSubject(data){
    return request({
        url: '/topic/delete',
        method: 'post',
        data
    })
}


// 上传路径常量
const uploadPath = process.env.BASE_API + '/storage/create'
export { uploadPath }

//对象存储
export function createStorage(data) {
    return request({
      url: '/storage/create',
      method: 'post',
      data
    })
}